Skip to content

Support automatic plugin loading in Data Prepper core.#6882

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:4838-plugins-within-plugins
May 28, 2026
Merged

Support automatic plugin loading in Data Prepper core.#6882
dlvenable merged 1 commit into
opensearch-project:mainfrom
dlvenable:4838-plugins-within-plugins

Conversation

@dlvenable

Copy link
Copy Markdown
Member

Description

This change allows plugin authors to load other plugins by defining @UsesDataPrepperPlugin on a field with a different type. It will automatically load the plugin using the PluginFactory and give the main plugin the desired plugin instance that they are looking for.

For backward compatibility, if the target type is PluginModel this will not attempt to load the plugin.

The overall approach I took was to add custom deserialization in the Jackson ObjectMapper to load the plugin.

This updates the sqs source to use this new capability for its InputCodec defined by the codec property.

Issues Resolved

Resolves #4838

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

This change allows plugin authors to load other plugins by defining @UsesDataPrepperPlugin on a field with a different type. It will automatically load the plugin using the PluginFactory and give the main plugin the desired plugin instance that they are looking for.

This updates the sqs source to use this new capability for its InputCodec defined by the codec property.

Resolves opensearch-project#4838

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable dlvenable force-pushed the 4838-plugins-within-plugins branch from 525f096 to 163d99c Compare May 22, 2026 16:08

@Davidding4718 Davidding4718 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think this will be helpful

@dlvenable dlvenable merged commit a18b56c into opensearch-project:main May 28, 2026
74 of 76 checks passed
@dlvenable dlvenable modified the milestone: v2.16 May 28, 2026
@dlvenable dlvenable deleted the 4838-plugins-within-plugins branch June 5, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support automatic plugin loading in Data Prepper core

3 participants